-- GENERATED SPELL FOR [Ebon Blade Reaper] --


function spell0_31316(pUnit, Event) --@Blood Plague,n/a--
pUnit:FullCastSpellOnTarget(60950,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31316', 12000, 1)
end

function spell1_31316(pUnit, Event) --@Blood Strike,n/a--
pUnit:FullCastSpellOnTarget(60945,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31316', 620, 1)
end

function spell2_31316(pUnit, Event) --@Death Coil,n/a--
pUnit:FullCastSpellOnTarget(60949,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31316', 0, 1)
end

function spell3_31316(pUnit, Event) --@Frost Strike,n/a--
pUnit:FullCastSpellOnTarget(60951,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31316', 595, 1)
end

function Sorts_31316(pUnit, Event)
local choix_sorts_31316 = math.random(0, 3)
if choix_sorts_31316 == 0 then
pUnit:RegisterEvent('spell0_31316', 1, 1)
end
if choix_sorts_31316 == 1 then
pUnit:RegisterEvent('spell1_31316', 1, 1)
end
if choix_sorts_31316 == 2 then
pUnit:RegisterEvent('spell2_31316', 1, 1)
end
if choix_sorts_31316 == 3 then
pUnit:RegisterEvent('spell3_31316', 1, 1)
end
end

function mob31316_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31316', math.random(1500, 3000), 1)
end

function mob31316_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31316_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31316_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31316, 1, 'mob31316_Action')
RegisterUnitEvent(31316, 2, 'mob31316_Leave')
RegisterUnitEvent(31316, 3, 'mob31316_Kill')
RegisterUnitEvent(31316, 4, 'mob31316_Die')
